'use strict';

const Controller = require('egg').Controller;

class BaseController extends Controller {
    async index() {
        const {ctx,service } = this;
        // 查询参数
        const query = {
            limit: ctx.helper.parseInt(ctx.query.pageSize),
            offset: ctx.helper.parseInt(ctx.query.pageNum)
        };
        const result = await service.admin[this.modleName][this.serviceName].findList(query);
        ctx.returnBody(result, 100010);
    }
}

module.exports = BaseController;